/*
 * Copyright (c) 2022, tyustli
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-02-08     tyustli      first implementation
 */

#include <stdio.h>
#include <math.h>

int main(int argc, char **argv)
{
    char operator_char = 0;
    int num1, num2;

    printf("please input operator(+ - * /) ");
    scanf("%c", &operator_char);

    printf("please input two num ");
    scanf("%d %d", &num1, &num2);

    switch (operator_char)
    {
    case '+':
        /* code */
        printf("%d + %d = %d\r\n", num1, num2, num1 + num2);
        break;
    case '-':
        /* code */
        printf("%d - %d = %d\r\n", num1, num2, num1 - num2);
        break;
    case '*':
        /* code */
        printf("%d * %d = %d\r\n", num1, num2, num1 * num2);
        break;
    case '/':
        /* code */
        printf("%d / %d = %d\r\n", num1, num2, num1 / num2);
        break;
    default:
        break;
    }

    return 0;
}

/******************** end of file **********************/
